package com.hyh.minio.config;

import com.hyh.minio.helper.MinioHelper;
import com.hyh.minio.service.FileService;
import com.hyh.minio.service.impl.FileServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * MinIo AutoConfiguration
 *
 * @Author: heyuhua
 * @Date: 2021/1/28 16:02
 */
@ConditionalOnWebApplication
@Configuration(proxyBeanMethods = false)
@ComponentScan("com.hyh.minio.config")
public class HyhMinIoAutoConfiguration {

    @Bean
    public MinioHelper minioHelper() {
        return new MinioHelper();
    }

    @Bean
    public FileService fileService() {
        return new FileServiceImpl();
    }

}
